load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test", "rust_test_suite")

package(default_visibility = [
    "//rs/certification/test-utils:__pkg__",
    "//rs/crypto:__subpackages__",
])

DEPENDENCIES = [
    # Keep sorted.
    "//rs/crypto/sha2",
    "@crate_index//:hex",
    "@crate_index//:rand",
    "@crate_index//:rand_chacha",
    "@crate_index//:serde",
    "@crate_index//:zeroize",
]

MACRO_DEPENDENCIES = []

DEV_DEPENDENCIES = []

MACRO_DEV_DEPENDENCIES = []

ALIASES = {}

rust_library(
    name = "seed",
    srcs = glob(["src/**"]),
    aliases = ALIASES,
    crate_name = "ic_crypto_internal_seed",
    proc_macro_deps = MACRO_DEPENDENCIES,
    version = "0.1.0",
    deps = DEPENDENCIES,
)

rust_test(
    name = "seed_test",
    aliases = ALIASES,
    crate = ":seed",
    proc_macro_deps = MACRO_DEPENDENCIES + MACRO_DEV_DEPENDENCIES,
    deps = DEPENDENCIES + DEV_DEPENDENCIES,
)

rust_test_suite(
    name = "seed_integration",
    srcs = glob(["tests/**/*.rs"]),
    aliases = ALIASES,
    proc_macro_deps = MACRO_DEPENDENCIES + MACRO_DEV_DEPENDENCIES,
    deps = [":seed"] + DEPENDENCIES + DEV_DEPENDENCIES,
)
